package com.s.rpc.provider.run;

import com.s.rpc.core.NettyServer;
import com.s.rpc.provider.impl.HelloWorldImpl;
import com.s.rpc.serializer.Serializer;
import com.s.rpc.utils.JsonSerializer;

/**
 * @author ShenshenLuo
 * @email luoshenshen@buaa.edu.cn
 * @date 2025/5/11 14:59
 **/
public class RunServer {
    public static void main(String[] args) throws InterruptedException {
        // 使用JSON序列化
        Serializer serializer = new JsonSerializer();

        NettyServer server = new NettyServer("localhost", 8080, serializer);
        server.registerService(new HelloWorldImpl());
        server.startServer();
    }
}
